Skip to content

Instantly share code, notes, and snippets.

@hamoid
hamoid / justTheDocsToPDF.bash
Last active January 23, 2026 12:02
Downloads a just-the-docs website and converts it into a PDF file for offline reading
#!/bin/bash
filename="openrndr-guide"
domain="guide.openrndr.org"
path="" # /some/folder/ if the guide is not located at /
mkdir -p /tmp/manual
cd /tmp/manual || exit
# curl downloads the index page of the website
@peterjaap
peterjaap / 1_product_queries.sql
Last active January 23, 2026 12:00 — forked from itris/1_product_queries.sql
Magento 2 - Remove duplicate store view-specific product and category data
/*
* IMPORTANT: The queries below are written for Magento Community. If you're going to run them on Magento Enterprise (Adobe Commerce), you need
* to replace all instances of ".entity_id" with ".row_id". See this for context: http://magento.stackexchange.com/questions/139740/magento-2-schema-changes-for-ee-catalog-staging
*
* When importing products in Magento 2, if you specify store view codes in the store_view_code column, product data will be set at
* both the global scope as well as the specific store view scope. This is not ideal because now you have duplicate
* data at two different scopes that shouldn't actually be duplicated. The scripts below clean up this data by finding
* data set at specific store view scopes and if it's an exact match to the data set at the global store view, then it
* deletes the data set at the specific store view scope.
*
@arch1t3cht
arch1t3cht / video_noob_guide.md
Last active January 23, 2026 11:59
What you NEED to know before touching a video file

What you NEED to Know Before Touching a Video File

Hanging out in subtitling and video re-editing communities, I see my fair share of novice video editors and video encoders, and see plenty of them make the classic beginner mistakes when it comes to working with videos. A man can only read "Use Handbrake to convert your mkv to an mp4 :)" so many times before losing it, so I am writing this article to channel the resulting psychic damage into something productive.

If you are new to working with videos (or, let's face it, even if you aren't), please read through this guide to avoid making mistakes that can cost you lots of computing power, storage space, or video quality.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active January 23, 2026 11:56
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:

面向竞赛框架(自用)

基础框架

支持:多组测试样例、快速读入(rd)、检查变量(debug())、检查容器(vdebug())、检查二进制(bit8())、以及LL PII

#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <climits>
@ve3xone
ve3xone / avg-score-urfu-brs.js
Last active January 23, 2026 11:52
[istudent.urfu.ru, urfu, УРФУ] Данный скрипт позволяет считать средний балл в БРС и также менять баллы чтоб посчитать приблизительно какой может быть ваш средний балл
// ==UserScript==
// @name Calculate Average Score URFU BRS
// @name:zh-CN 计算平均得分URFU BRS
// @namespace https://gist.github.com/ve3xone/93ee59086618b9e3925bc4376f0feec0
// @version 2026-01-22-v1.09
// @description Данный скрипт позволяет считать средний балл в БРС и также менять баллы чтоб посчитать приблизительно какой может быть ваш средний балл
// @description:zh-CN 该脚本允许您在 BRS 系统中计算平均分,并支持临时修改分数以预测您的最终平均成绩。
// @author Vladislav Startsev (aka ve3xone)
// @match https://istudent.urfu.ru/s/servis-informirovaniya-studenta-o-ballah-brs*
// @match https://istudent.urfu.ru/s/http-urfu-ru-ru-students-study-brs*
╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity
@oseiskar
oseiskar / swagger-yaml-to-html.py
Last active January 23, 2026 11:51
Converts Swagger YAML to a static HTML document (needs: pip install PyYAML)
#!/usr/bin/python
#
# Copyright 2017 Otto Seiskari
# Licensed under the Apache License, Version 2.0.
# See http://www.apache.org/licenses/LICENSE-2.0 for the full text.
#
# This file is based on
# https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0)
#